<?php
	$root = "http://".$_SERVER['HTTP_HOST']."/".substr($_SERVER['PHP_SELF'], 1, strpos(substr($_SERVER['PHP_SELF'], 1), "/"))."/";
?>
<!DOCTYPE html>
<!-- 
文件用途:视频监控系统
作者:hjl
制作日期:2013-1-9
最后编辑人:hjl
最后编辑时间:2013-1-9
-->
<html lang="en">
  <head>
    <title>视频监控系统</title>
    <base href="<?php echo $root;?>">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0"> 
    <?php include '../pages/common/importBaseCss.php'; ?>
    <?php include '../pages/common/importVideoTemplate.php'; ?>
	<script type="text/javascript">
	var aclData= {available:"true"};
	var breadCrumbDatas = [{"id":1,href:"index.jsp",clazz:'icon-home'},
			{id:2,text:'视频监控系统',href:'pages/GisMonitoringSystem/index.jsp'},
			{id:3,text:'视频监控系统'}
		   ];
	var dynamicFormDatas = {
		   mineDatas:[{value:"100004013",display:"青坪煤矿"},{value:"100004019",display:"祥达煤矿"},{value:"100007002",display:"祖德煤矿"},{value:"100007003",display:"兴济煤矿"},{value:"100004012",display:"云乡煤矿"},{value:"100003015",display:"兴建煤矿"},{value:"100003001",display:"江浪煤矿"},{value:"100003007",display:"沿河煤矿"}]
		  };	   
	</script>
    </head>
    <body>
		<div id="loading_layer" style="display:none"><img src="img/ajax_loader.gif" alt="" /></div>
		<!-- style switcher -->
		<div class="style_switcher">
		</div>
		
		<div id="maincontainer" class="clearfix">
			<!-- header -->
            <header>
                <div class="navbar navbar-fixed-top">
                    <div class="navbar-inner">
                    </div>
                </div>
            </header>
            <!-- main content -->
            <div id="contentwrapper">
                <div class="main_content">
                    <!-- breadCrumb -->
                    <nav>
                        <div id="jCrumbs" class="breadCrumb module">
                        </div>
                    </nav>
                    <div class="row-fluid">
						<div class="span12">
							<h3 class="heading">视频监控系统2222</h3>
							<div class="row-fluid">
								<div class="span4">
									<div class="row-fluid" id="g-map-top">
										<div class="span12">
											<div class="well">
												<form class="input-append" id="video_search">
													<select id="search_mine" class="span8"></select><button type="submit" class="btn"><i class="splashy-zoom"></i></button>
												</form>
											</div>
											<div id="channelInfoList_container" class="well hide">
												<div id="channelInfoList">
													
												</div>
											</div>
										</div>
									</div>
								</div>
								<div class="span8">
									<div class="well">
										<div id="video_container" style="width:100%;height:500px">
											<OBJECT id="NetVideoActiveX" name="ocx" standby="Waiting..." classid="clsid:5A418331-514E-4C54-B526-6AC3C135FFD2" codebase="resources/plugin/NetVideoActiveX_V23.cab#version=2,3,23,2" width="100%" height="100%" align="center">
												<PARAM NAME="_Version" VALUE="65536">
												<PARAM NAME="_ExtentX" VALUE="22807">
												<PARAM NAME="_ExtentY" VALUE="10424">
												<PARAM NAME="_StockProps" VALUE="0">
											</OBJECT>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
					
					<!-- hide elements -->
					<div class="hide">
					   
					</div>
					
                </div>
            </div>
            
			<!-- sidebar -->
            <a href="javascript:void(0)" class="sidebar_switch on_switch ttip_r" title="隐藏侧边栏">侧边栏</a>
            <div class="sidebar" id="sidebar">
			</div>
		</div>
		<%@ include file="/common/importBaseJs.jsp" %>
		<!-- app.js 
		<script src="js/app/example/listbox.js"></script>
		-->
<script type="text/javascript">
	/*
	*文件用途:GIS展示
	*作者:hjl
	*制作日期:2012-12-11
	*最后编辑人:hjl
	*最后编辑时间:2012-12-11
	*/	
	//================
	//模块入口
	//================
    $(document).ready(function() {
    	if("undefined" != typeof aclData){
    		if("undefined" != typeof dynamicFormDatas){
				app.buildDynamicForm(dynamicFormDatas);			
			}
			app.actions(); 
		}else{
			smoke.alert('对不起,权限信息丢失',{ok:"关闭"},function(e){
				window.location.href = "index.jsp";
			});
		}
    });
    app = {
		//================
		//初始化环境
		//================           
    	initVideo : function(){
    		
		},
    	//================
    	//获取设备通道表
    	//================   		
    	getDecList: function(postData){
	    	$.ajax({
	            type : "post",
	            url : "json/channelInfo.json",
	            data : postData,
	            dataType : "json",                  
	            success : function(msg){
	            	if(msg!=null && msg.length>0){
 						var data = {};
 						data.info = msg;
 						var templateFn = doT.template(document.getElementById('videoChannelInfoList-template').text);
	            		var infoContent = templateFn(data);
	            		$("#channelInfoList").html(infoContent);
	            		$("#channelInfoList_container").show();
	            		gebo_tips.init();	            	
	            	}else{
	            		$("#channelInfoList").html("监控建设中...");
	            		$("#channelInfoList_container").show();
	            	}

	            },
	            error : function(XMLHttpRequest, textStatus, errorThrown){
	            	smoke.alert('服务器出错，请稍候再试！',{ok:"取消"});
	            }
	    	});   	
    	},		
		//================
		//其他操作
		//================        
		actions: function() {
			//煤矿名称选择点击操作
			$("#video_search #search_mine").change(function(e){
				var mineId = $("#video_search #search_mine").val();
				var data = {};
				data.mineId = mineId;
				app.getDecList(data);
			});	
			
		},		
		//================
		//创建表单中动态项
		//================       	
      	buildDynamicForm: function(data){
      		var mineDatas = data.mineDatas;
      		var channelDatas = data.channelDatas;
      		if(mineDatas!=null){
      			amplify.publish("buildSelectOption",$("#video_search #search_mine"),mineDatas);
      		}
      	},
	};
</script>
		<script src="js/gebo_common.js"></script>
	</body>
</html>